
export default function ({ store }) {
    const getRem = () => {
        var html = document.querySelector("html");
        var w = document.body.clientWidth || document.documentElement.clientWidth;
        var rem = (w / 1920) * 1;
        html.style.fontSize = rem + "px";
    }
    getRem();
    window.addEventListener("resize", function () {
        getRem();
    });
    window.addEventListener('scroll', function () {
        let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
        store.commit('SET_HEADER', scrollTop)
    })
}
